Package size generator for README#924
Conversation
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
# Conflicts: # packages/share/README.md
I'm tired of depending on the Bundlephobia data generator so I've put an adjustment together that will use the measure script to update the package.json and eventually the README file badges.
scripts/measure.ts— Extended the existingmeasurescript with three new behaviours:--saveflag writes the gzip size toprimitive.gzipin each package'spackage.jsonand replaces the Bundlephobia badge in each package'sREADME.mdwith a static shields.io badgescripts/update-readme.ts— Updated to use the storedprimitive.gzipvalue when generating the root README's Size column, falling back to Bundlephobia only when no local value exists.scripts/utils/get-modules-data.ts— Addedgzip?: numberto thePrimitiveDatatype.template/package.json— Added"measure"script so new packages get it automatically..github/workflows/tests.yml— On pushes tomainonly (not PRs), runspnpm measure --save && pnpm update-readmeafter a green build and commits any size changes back with[skip ci].90 packages updated —
primitive.gzipwritten to eachpackage.jsonand size badges updated in READMEs and the root README table.